#include<iostream>
#include<vector>
#include<algorithm>

using std::cin;
using std::cout;
using std::vector;
using std::min;
using std::pair;
using std::make_pair;

struct Point {
    int x, y;

    Point(int x, int y) : x(x), y(y) {
    }

    Point() : x(0), y(0) {
    }
};

int distance(Point first, Point second) {
    return (first.x - second.x) * (first.x - second.x)
    + (first.y - second.y) * (first.y - second.y);
}

void add_edge(vector<vector<int> > &graph, int v, int u) {
    graph[v].push_back(u);
    graph[u].push_back(v);
    return;
}

void dfs(vector<vector<int> > &graph, vector<bool> &used, int n, int v) {
    used[v] = true;
    for (int to : graph[v]) {
        if (!used[to]) {
            dfs(graph, used, n, to);
        }
    }
}

int main() {
    int n, k;
    cin >> n >> k;
    vector<vector<int> > graph(n);
    vector<Point> points;
    for (int i = 0; i < n; ++i) {
        int x, y;
        cin >> x >> y;
        points.push_back(Point(x, y));
    }
    for (int first = 0; first < n; ++first) {
        for (int second = first + 1; second < n; ++second) {
            if (distance(points[first], points[second]) <= k * k) {
                add_edge(graph, first, second);
            }
        }
    }
    vector<bool> used;
    used.assign(n, false);
    dfs(graph, used, n, 0);
    bool are_all_used = true;
    for (int v = 0; v < n; ++v) {
        if (!used[v]) {
            are_all_used = false;
        }
    }
    cout << (are_all_used ? "YES" : "NO");
    return 0;
}
